package com.aprilTomCat.TestServlet;

import com.aprilTomCat.Servlet.HttpServetRequest;
import com.aprilTomCat.Servlet.HttpServetResponse;
import com.aprilTomCat.Servlet.HttpServlet;
import com.aprilTomCat.util.ResponseUtil;
import com.aprilTomCat.webServlet.WebServlet;

import java.io.IOException;

@WebServlet(urlMapping = "/second")
public class SecondServlet extends HttpServlet {
    @Override
    public void doGet(HttpServetRequest request, HttpServetResponse response) throws IOException {
        response.getWriteNIO(ResponseUtil.getResponseHeader200("this is get second"));
    }

    @Override
    public void doPost(HttpServetRequest request, HttpServetResponse response) throws IOException {
        response.getWrite(ResponseUtil.getResponseHeader200("this is post Method"));
    }
}
